<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>De Stijl: /Users/Piro/Dropbox/destijl/c/headers/drobot.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">De Stijl
   
   </div>
   <div id="projectbrief">Librairie pour le projet De Stijl</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('drobot_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">/Users/Piro/Dropbox/destijl/c/headers/drobot.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* </span>
<a name="l00002"></a>00002 <span class="comment"> * File:   DRobot.h</span>
<a name="l00003"></a>00003 <span class="comment"> * Author: pehladik</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * Created on 5 janvier 2012, 17:05</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> ============================================================================</span>
<a name="l00008"></a>00008 <span class="comment"> Name        : robot.h</span>
<a name="l00009"></a>00009 <span class="comment"> Author      : Sebastien DI MERCURIO</span>
<a name="l00010"></a>00010 <span class="comment"> Version     :</span>
<a name="l00011"></a>00011 <span class="comment"> Copyright   :</span>
<a name="l00012"></a>00012 <span class="comment"> Description : Interface de la bibliotheque de commande du robot</span>
<a name="l00013"></a>00013 <span class="comment"> ============================================================================</span>
<a name="l00014"></a>00014 <span class="comment"> */</span>
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="preprocessor">#ifndef ROBOT_H</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define ROBOT_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span>
<a name="l00019"></a>00019 <span class="preprocessor">#ifdef  __cplusplus</span>
<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00021"></a>00021 <span class="preprocessor">#endif</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="dconstantes_8h.html" title="Déclaration des constantes du projet.">dconstantes.h</a>&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026     <span class="comment">/*</span>
<a name="l00027"></a>00027 <span class="comment">     * Code de retour des fonctions</span>
<a name="l00028"></a>00028 <span class="comment">     */</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 
<a name="l00031"></a>00031     <span class="keyword">extern</span> <span class="keywordtype">char</span> *RobotComFilename;
<a name="l00032"></a>00032     <span class="keyword">typedef</span> <span class="keywordtype">int</span> RobotStatus;
<a name="l00033"></a>00033 
<a name="l00039"></a><a class="code" href="struct_d_robot.html">00039</a>     <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> {
<a name="l00040"></a><a class="code" href="struct_d_robot.html#a42f32bdf07dcf84888d4163852f697c8">00040</a>         void(*<a class="code" href="struct_d_robot.html#a42f32bdf07dcf84888d4163852f697c8">free</a>) (<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This); 
<a name="l00041"></a><a class="code" href="struct_d_robot.html#a7cb6fb037eb5944ce88129a25f3d7d21">00041</a>         void(*<a class="code" href="struct_d_robot.html#a7cb6fb037eb5944ce88129a25f3d7d21">print</a>) (<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This); 
<a name="l00042"></a><a class="code" href="struct_d_robot.html#ab53116d687a6d5092c97df621ceb1220">00042</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#ab53116d687a6d5092c97df621ceb1220">open_device</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This); 
<a name="l00043"></a><a class="code" href="struct_d_robot.html#a8f35a6b74a51787efd0597de279dd802">00043</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a8f35a6b74a51787efd0597de279dd802">close_com</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This); 
<a name="l00044"></a><a class="code" href="struct_d_robot.html#a75f9f48d7e4433671ffc91e648a4a3c4">00044</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a75f9f48d7e4433671ffc91e648a4a3c4">start</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This); 
<a name="l00045"></a><a class="code" href="struct_d_robot.html#afbb95101ade4de2f856ab6d518d4c5a7">00045</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#afbb95101ade4de2f856ab6d518d4c5a7">start_insecurely</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This); 
<a name="l00046"></a><a class="code" href="struct_d_robot.html#a8d55cba45bb5617986cee9c812a02bbe">00046</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a8d55cba45bb5617986cee9c812a02bbe">stop</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This); 
<a name="l00047"></a><a class="code" href="struct_d_robot.html#a19d45d0664cf4f17b09b47064f3a9fc4">00047</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a19d45d0664cf4f17b09b47064f3a9fc4">set_motors</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> motor_left, <span class="keywordtype">int</span> motor_right); 
<a name="l00048"></a><a class="code" href="struct_d_robot.html#a6f1a63347b5d98e3251805f703132f26">00048</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a6f1a63347b5d98e3251805f703132f26">reload_wdt</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This); 
<a name="l00049"></a><a class="code" href="struct_d_robot.html#a96e1df8e32deb8b92f1dc8451cb19890">00049</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a96e1df8e32deb8b92f1dc8451cb19890">get_sensor</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *sensor); 
<a name="l00050"></a><a class="code" href="struct_d_robot.html#abfdb90867e6c1fd16ac8a319bcdc7af7">00050</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#abfdb90867e6c1fd16ac8a319bcdc7af7">get_odo</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *odo_left, <span class="keywordtype">int</span> *odo_right); 
<a name="l00051"></a><a class="code" href="struct_d_robot.html#a9ac7be76b60c62be9d4374ff1c25863e">00051</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a9ac7be76b60c62be9d4374ff1c25863e">get_vbat</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *vbat); 
<a name="l00052"></a><a class="code" href="struct_d_robot.html#a3f290aa73a2bdfb678de8e8600d15892">00052</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a3f290aa73a2bdfb678de8e8600d15892">get_version</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *versionMajor, <span class="keywordtype">int</span> *versionMinor); 
<a name="l00053"></a><a class="code" href="struct_d_robot.html#a9c1ce61ee08944131d8b95ba1ed26de5">00053</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a9c1ce61ee08944131d8b95ba1ed26de5">get_status</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This); 
<a name="l00054"></a><a class="code" href="struct_d_robot.html#a072eef376ea923def9a72fc6bc36b1c7">00054</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a072eef376ea923def9a72fc6bc36b1c7">move</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> range); 
<a name="l00055"></a><a class="code" href="struct_d_robot.html#ab35b549e8744c9e60e75369d94ad447c">00055</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#ab35b549e8744c9e60e75369d94ad447c">turn</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> angle, <span class="keywordtype">int</span> direction); 
<a name="l00056"></a><a class="code" href="struct_d_robot.html#a447c7e2a772373d18aefc2237ed09c66">00056</a>         RobotStatus(*<a class="code" href="struct_d_robot.html#a447c7e2a772373d18aefc2237ed09c66">is_busy</a>)(<span class="keyword">struct </span><a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *busy); 
<a name="l00057"></a><a class="code" href="struct_d_robot.html#a60286dc5da1de5748677e9dc25f9c631">00057</a>         RobotStatus <a class="code" href="struct_d_robot.html#a60286dc5da1de5748677e9dc25f9c631">status</a>; 
<a name="l00058"></a>00058     } <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a>;
<a name="l00059"></a>00059 
<a name="l00065"></a>00065     <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a>* d_new_robot(<span class="keywordtype">void</span>);
<a name="l00066"></a>00066 
<a name="l00072"></a>00072     <span class="keywordtype">void</span> d_robot_free(<a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> *This);
<a name="l00073"></a>00073 
<a name="l00079"></a>00079     <span class="keywordtype">void</span> d_robot_print(<a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> *This);
<a name="l00080"></a>00080 
<a name="l00098"></a>00098     RobotStatus d_robot_open_device(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This);
<a name="l00099"></a>00099 
<a name="l00108"></a>00108     RobotStatus d_robot_close_com(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This);
<a name="l00109"></a>00109 
<a name="l00123"></a>00123     RobotStatus d_robot_start(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This);
<a name="l00124"></a>00124 
<a name="l00138"></a>00138     RobotStatus d_robot_start_insecurely(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This);
<a name="l00139"></a>00139 
<a name="l00152"></a>00152     RobotStatus d_robot_stop(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This);
<a name="l00153"></a>00153 
<a name="l00172"></a>00172     RobotStatus d_robot_set_motors(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> motor_left, <span class="keywordtype">int</span> motor_right);
<a name="l00173"></a>00173 
<a name="l00189"></a>00189     RobotStatus d_robot_reload_wdt(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This);
<a name="l00190"></a>00190 
<a name="l00211"></a>00211     RobotStatus d_robot_get_sensor(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *sensor);
<a name="l00212"></a>00212 
<a name="l00232"></a>00232     RobotStatus d_robot_get_odo(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *odo_left, <span class="keywordtype">int</span> *odo_right);
<a name="l00233"></a>00233 
<a name="l00256"></a>00256     RobotStatus d_robot_get_vbat(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *vbat);
<a name="l00257"></a>00257 
<a name="l00274"></a>00274     RobotStatus d_robot_get_version(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *versionMajor, <span class="keywordtype">int</span> *versionMinor);
<a name="l00275"></a>00275 
<a name="l00276"></a>00276 
<a name="l00287"></a>00287     RobotStatus d_robot_get_status(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This);
<a name="l00288"></a>00288 
<a name="l00302"></a>00302     RobotStatus d_robot_move(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> range);
<a name="l00303"></a>00303 
<a name="l00320"></a>00320     RobotStatus d_robot_turn(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> angle, <span class="keywordtype">int</span> direction);
<a name="l00321"></a>00321     
<a name="l00338"></a>00338     RobotStatus d_robot_is_busy(<span class="keyword">struct</span> <a class="code" href="struct_d_robot.html" title="DRobot est un objet contenant la description d&#39;une robot à réaliser par le superviseur.">DRobot</a> * This, <span class="keywordtype">int</span> *busy);
<a name="l00339"></a>00339 
<a name="l00340"></a>00340 <span class="preprocessor">#ifdef  __cplusplus</span>
<a name="l00341"></a>00341 <span class="preprocessor"></span>}
<a name="l00342"></a>00342 <span class="preprocessor">#endif</span>
<a name="l00343"></a>00343 <span class="preprocessor"></span>
<a name="l00344"></a>00344 <span class="preprocessor">#endif  </span><span class="comment">/* DRobot_H */</span>
<a name="l00345"></a>00345 
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>drobot.h</b>      </li>

    <li class="footer">Generated on Tue Apr 24 2012 14:13:31 for De Stijl by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6 </li>
   </ul>
 </div>


</body>
</html>
